package com.takeoutsystem.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.takeoutsystem.bean.Cabinet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface CabinetMapper extends BaseMapper<Cabinet> {
    @Select("select state_code state,count(state_code) count from cabinet GROUP BY state_code")
    public List<Map<String,Integer>> countByState();
}
